<template>
  <view>影院列表</view>
</template>

<script lang="ts" setup>
import { getCurrentInstance } from "vue";
import { onShow } from "@dcloudio/uni-app";

onShow(() => {
  // uniapp 下获取当前页面 getTabBar() 的写法
  const { ctx } = getCurrentInstance() as any;
  const tabInstance = ctx.$scope.getTabBar();

  // 修改该 tabInstance 的 selectedIndex
  tabInstance.setData({ selectedIndex: 1 });
});
</script>
